#
# Copyright © 2021 深圳百问网科技有限公司 All Rights Reserved.
# https://www.100ask.net
# https://shop502068889.taobao.com/
#
# SPDX-License-Identifier: BSD-3-Clause
#

"""
接线
    Vcc  3v3（请勿使用5V）
    GDN GDN
    SCL  05    (ESP8266中对应引脚D1)
    SDA  04   (ESP8266中对应引脚D2）

"""
import time
from machine import I2C, Pin
from mpu6050 import MPU6050

i2c = I2C(scl=Pin(5), sda=Pin(4))
mpu6050 = MPU6050(i2c)

try:
    while True:
        mpu6050.get_values()
        time.sleep(0.5)
except KeyboardInterrupt:
       pass
